//
// Created by shen on 2024/10/30.
//

#ifndef CROSSPLATFORMPLAYER_SDLRENDER_H
#define CROSSPLATFORMPLAYER_SDLRENDER_H
#include <VideoRender.h>

extern "C" {
#include <libavutil/frame.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_thread.h>
#include <ImageDef.h>
}

class SDLRender:public VideoRender{
private:
    int ret{};
    int width{},height{};
    SDL_Texture * texture = NULL;
    SDL_Renderer * renderer = NULL;
public:

    SDLRender();
    virtual ~SDLRender();
    virtual void Init(int videoWidth, int videoHeight, int *dstSize);
    virtual void UnInit() ;
    virtual void RenderVideoFrame(NativeImage *pImage);
    virtual void RenderVideoFrame( AVFrame *pImage);

//    void RenderVideoFrame(int *pImage) override
};


#endif //CROSSPLATFORMPLAYER_SDLRENDER_H
